package com.oe.code.dao;

import com.oe.code.pojo.LagouAuthCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;


public interface LagouAuthCodeDao extends JpaRepository<LagouAuthCode,Integer>,JpaSpecificationExecutor<LagouAuthCode>{

    @Query(value = "select * from lagou_auth_code where code= ?1 and email= ?2 order by createtime DESC limit 1" ,nativeQuery = true)
    public LagouAuthCode selectOneByCodeAndAndEmail(String code,String email);
}
